﻿using System;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using System.Web.UI.WebControls;
using ConsolidationTool.Common;
using System.Collections.Generic;

namespace ConsolidationTool.WebParts.Layouts.CReport.Brochure
{
    public partial class P7 : FSReportBase
    { 
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        public override ControlTemplates.CommonEntitySelector TopSelector
        {
            get
            {
                return commonEntitySelector as ControlTemplates.CommonEntitySelector;
            } 
        }
        public override Repeater BaseReport
        {
            get
            {
                return EQRepeater;
            }
        }
        public override Repeater BaseFreeRepeater
        {
            get
            {
                return FreeRepeater;
            }
        }

        public override void BeforLoad()
        {
            base.BeforLoad();

            if (CEntity != null) {
                CEntity.ReportTemplateName = "P7";

                CEntity.TableRow = "H|15";
                CEntity.FreeRow = "E|21"; 
            }
        }



        public override void ExportReport_Click(object sender, EventArgs e)
        {
            AdditionOutput.Add("H11", CEntity.CM);
            AdditionOutput.Add("O11", CEntity.YTDM);
            AdditionOutput.Add("C15", "SBEW Head Products Manufactured (€/_Tonnage_)".Replace("€", CEntity.LocalCurrency).Replace("_Tonnage_",CEntity.Toannge));
            AdditionOutput.Add("C16", "Variable costs Head Products Manufactured €/_Tonnage_".Replace("€", CEntity.LocalCurrency).Replace("_Tonnage_", CEntity.Toannge));

            AdditionOutput.Add("C19", "IN " + CEntity.Currency);
            AdditionOutput.Add("L19", "IN " + CEntity.Currency); 
            base.ExportReport_Click(sender, e); 
        }
    }
}
